//城市配置api
import {apiRequestList} from "@/common/axios"
import tool from "@/common/tool.js"
let userMess = tool.getStorage("userMess"),mess = JSON.parse(userMess),{appId,userId,workNo} = mess;

const onlineCityList =  '/dt-business/base/city/online/page',//上线城市列表
      onlineCityUpdate = '/dt-business/base/city/online/update',//上线城市修改
      onlineCityAdd = '/dt-business/base/city/online/create', //上线城市添加
      areaPages  = '/dt-business/base/city/plate/page',//区域列表
      areaUpdate  = '/dt-business/base/city/plate/update',//区域更新
      areaDelete  = '/dt-business/base/city/plate/delete',//区域删除
      areaAdd  = '/dt-business/base/city/plate/batchcreate',//区域添加
      loopAdd  = '/dt-business/base/loopline/batchcreate',//环线增加
      loopPages  = '/dt-business/base/loopline/page',//环线列表
      loopUpdate  = '/dt-business/base/loopline/update',//环线修改
      loopDelete  = '/dt-business/base/loopline/delete',//环线删除
      mettroAdd = "/dt-business/base/metro/station/batchcreate",//新增地铁信息
      mettroDelete = "/dt-business/base/metro/station/delete",//新增地铁信息
      mettroList = "/dt-business/base/metro/station/list",//新增地铁信息
      mettroUpdate = "/dt-business/base/metro/edit",//地铁信息编辑
      citytagList = '/dt-business/base/citytags/listAll',//更多标签列表
      citytagAll = '/dt-business/base/citytags/list',//更多标签列表(不分类型)
      citytagUpdate = '/dt-business/base/citytags/update',//更多标签修改
      citytagCreate = '/dt-business/base/citytags/create',//更多标签创建
      citytagDelete = '/dt-business/base/citytags/delete',  //更多标签删除
      selectedAllList = '/dt-business/base/criteria/selectCriteriaByCityCode',//筛选列表 
      selectedSaveOrUpdate = '/dt-business/base/criteria/saveOrUpdate'//新增跟更新 
    
  export const getSelectedAllList =  (params={})=>{
   params = Object.assign(params,{appId, createrId:userId});
   return apiRequestList.$post(selectedAllList,params)
  }
  export const getSelectedAll =  (params={})=>{
   params = Object.assign(params,{appId, createrId:userId,page:1,rows:100});
   return apiRequestList.$post(citytagAll,params)
  }
  export const getSelectedSaveOrUpdate =  (params={})=>{
   params = Object.assign(params,{appId, updaterId:userId});
   return apiRequestList.$post(selectedSaveOrUpdate,params)
  }

  export const getCitytagList = (params={})=>{
     params = Object.assign(params,{appId, createrId:userId});
     return apiRequestList.$post(citytagList,params)
  }
  export const getCitytagUpdate = (params={})=>{
     params = Object.assign(params,{appId, updaterId:userId});
     return apiRequestList.$post(citytagUpdate,params)
  }
  export const getCitytagCreate = (params={})=>{
     params = Object.assign(params,{appId, createrId:userId});
     return apiRequestList.$post(citytagCreate,params)
  }
  export const getCitytagDelete = (params={})=>{
   params = Object.assign(params,{appId});
   return apiRequestList.$post(citytagDelete,params)
}
      
  export const getMettroAdd = (params={})=>{
    params = Object.assign(params,{appId, createrId:userId});
    return apiRequestList.$post(mettroAdd,params)
 }
 export const getMettroDelete = (params={})=>{
    params = Object.assign(params,{appId});
    return apiRequestList.$post(mettroDelete,params)
 }
 export const getMettroList = (params={})=>{
    params = Object.assign(params,{appId});
    return apiRequestList.$post(mettroList,params)
 }
 export const getMettroUpdate = (params={})=>{
    params = Object.assign(params,{appId,createrId:userId});
    return apiRequestList.$post(mettroUpdate,params)
 }

 export const getLoopAdd = (params={})=>{
    params = Object.assign(params,{appId, createrId:userId});
    return apiRequestList.$post(loopAdd,params)
 }
 export const getLoopPages = (params={})=>{
    params = Object.assign(params,{appId});
    return apiRequestList.$post(loopPages,params)
 }
 export const getLoopUpdate = (params={})=>{
    params = Object.assign(params,{appId, updaterId:userId});
    return apiRequestList.$post(loopUpdate,params)
 }
 export const getLoopDelete = (params={})=>{
    params = Object.assign(params,{appId});
    return apiRequestList.$post(loopDelete,params)
 }
export const getOnlineCityList = (params={})=>{
   params = Object.assign(params,{appId});
   return apiRequestList.$post(onlineCityList,params)
}
export const getOnlineCityUpdate = (params={})=>{
    params = Object.assign(params,{appId,updaterId:userId});
    return apiRequestList.$post(onlineCityUpdate,params)
 }
 export const getOnlineCityAdd = (params={})=>{
    params = Object.assign(params,{appId,createrId: userId});
    return apiRequestList.$post(onlineCityAdd,params)
 }
 export const getAreaPages = (params={})=>{
    params = Object.assign(params,{appId,createrId: userId});
    return apiRequestList.$post(areaPages,params)
 }
 export const getAreaUpdate = (params={})=>{
    params = Object.assign(params,{appId,updaterId: userId});
    return apiRequestList.$post(areaUpdate,params)
 }
 export const getAreaDelete = (params={})=>{
    params = Object.assign(params,{appId,createrId: userId});
    return apiRequestList.$post(areaDelete,params)
 }
 export const getAreaAdd = (params={})=>{
    params = Object.assign(params,{appId,createrId: userId});
    return apiRequestList.$post(areaAdd,params)
 }